﻿using aier.business.logic;
using aier.dataaccess.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace aier.wx.api.selfhost.Controllers
{
    //[Authorize]
    [RoutePrefix("api/Area")]
    public class AreaController : ApiController
    {
        public AreaBll areaBll { get; set; }

        /// <summary>
        /// 获取所有的行政区域
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [Route("api/Area/GetAllArea")]
        public IHttpActionResult GetAllArea()
        {
            List<AreaView> areas = areaBll.QueryAllArea();

            return Ok<List<AreaView>>(areas);
        }

        public IHttpActionResult Post(string appointmentJson)
        {


            return null;
        }
    }
}
